// 深色主题侧边栏样式
.theme-dark {
  // Logo区域样式
  .logo-group {
    background-color: #1c2e47 !important;
    border-bottom: 1px solid #213653;
    
    .text-primary {
      color: #ffffff !important;
      font-weight: 600;
      font-size: 16px;
      letter-spacing: 1px;
    }
    
    img {
      filter: brightness(1.1);
    }
    
    &:hover {
      background-color: #222e41 !important;
      
      .text-primary {
        color: #a5def1 !important;
      }
    }
  }
  
  // 侧边栏容器
  .d2-layout-header-aside-group {
    .d2-layout-header-aside {
      .d2-theme-container {
        .d2-theme-container-aside {
          background-color: #2a3950;
          border-right: 1px solid #5f6e8a;
          
          // 侧边栏菜单
          .el-menu {
            background-color: #2a3950 !important;
            border-right: none;
            
            .el-menu-item {
              color: #88a7b1 !important;
              background-color: transparent !important;
              border-bottom: 1px solid rgba(95, 110, 138, 0.1);
              
              &:hover {
                color: #a5def1 !important;
                background-color: #222e41 !important;
              }
              
              &.is-active {
                color: #c0edfc !important;
                background-color: #3a7b99 !important;
                border-right: 3px solid #70afce;
              }
              
              i {
                color: inherit !important;
              }
              
              .svg-icon {
                color: inherit !important;
              }
            }
            
            .el-submenu {
              .el-submenu__title {
                color: #88a7b1 !important;
                background-color: transparent !important;
                border-bottom: 1px solid rgba(95, 110, 138, 0.1);
                
                &:hover {
                  color: #a5def1 !important;
                  background-color: #222e41 !important;
                }
                
                i {
                  color: inherit !important;
                }
                
                .el-submenu__icon-arrow {
                  color: inherit !important;
                }
              }
              
              &.is-active {
                .el-submenu__title {
                  color: #c0edfc !important;
                  background-color: #3a7b99 !important;
                }
              }
              
              .el-menu {
                background-color: #364966 !important;
                
                .el-menu-item {
                  background-color: #364966 !important;
                  color: #88a7b1 !important;
                  padding-left: 50px !important;
                  
                  &:hover {
                    color: #a5def1 !important;
                    background-color: #397a97 !important;
                  }
                  
                  &.is-active {
                    color: #c0edfc !important;
                    background-color: #3a7b99 !important;
                  }
                }
              }
            }
          }
          
          // 菜单为空时的样式
          .d2-layout-header-aside-menu-empty {
            background-color: #2a3950;
            color: #88a7b1;
            
            &:hover {
              background-color: #222e41;
              color: #a5def1;
            }
            
            i {
              color: inherit;
            }
            
            span {
              color: inherit;
            }
          }
        }
      }
    }
  }
  
  // 顶部导航栏
  .d2-theme-header {
    background-color: #1c2e47 !important;
    border-bottom: 1px solid #213653;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    
    .el-menu {
      background-color: #1c2e47 !important;
      
      .el-menu-item {
        color: #ffffff !important;
        background-color: transparent !important;
        
        &:hover {
          color: #a5def1 !important;
          background-color: #222e41 !important;
        }
        
        &.is-active {
          color: #a5def1 !important;
          background-color: #3a7b99 !important;
        }
        
        i {
          color: inherit !important;
        }
      }
      
      .el-submenu {
        .el-submenu__title {
          color: #ffffff !important;
          background-color: transparent !important;
          
          &:hover {
            color: #a5def1 !important;
            background-color: #222e41 !important;
          }
          
          .el-submenu__icon-arrow {
            color: inherit !important;
          }
        }
        
        &.is-active {
          .el-submenu__title {
            color: #a5def1 !important;
            background-color: #3a7b99 !important;
          }
        }
      }
    }
    
    // 切换按钮
    .toggle-aside-btn {
      i {
        color: #ffffff !important;
        
        &:hover {
          color: #a5def1 !important;
        }
      }
    }
    
    // 右侧按钮
    .d2-header-right {
      .btn-text {
        color: #ffffff !important;
        
        &.can-hover:hover {
          color: #a5def1 !important;
          background-color: #222e41 !important;
        }
      }
    }
  }
  
  // 多页面控制器
  .d2-multiple-page-control {
    background-color: #1c2e47 !important;
    border-bottom: 1px solid #213653;
    
    .el-tabs__header {
      background-color: #1c2e47;
      
      .el-tabs__nav {
        background-color: #1c2e47;
        border-color: #213653;
        
        .el-tabs__item {
          color: #88a7b1 !important;
          background-color: transparent !important;
          border-left-color: #213653 !important;
          border-bottom: 2px solid transparent;
          
          &:hover {
            color: #a5def1 !important;
            background-color: #222e41 !important;
          }
          
          &.is-active {
            color: #c0edfc !important;
            background-color: #3a7b99 !important;
            border-bottom-color: #3a7b99 !important;
          }
        }
      }
      
      .el-tabs__nav-prev,
      .el-tabs__nav-next {
        color: #88a7b1 !important;
        
        &:hover {
          color: #a5def1 !important;
        }
      }
    }
  }
  
  // 按钮样式
  .el-button {
    &--primary {
      background: linear-gradient(135deg, #3a7b99 0%, #70afce 100%);
      border-color: #3a7b99;
      
      &:hover {
        background: linear-gradient(135deg, #4189aa 0%, #a5def1 100%);
        border-color: #4189aa;
      }
      
      &:active {
        background: linear-gradient(135deg, #3b697e 0%, #3a7b99 100%);
        border-color: #3b697e;
      }
    }
    
    &--default {
      background-color: transparent;
      border-color: #5f6e8a;
      color: #88a7b1;
      
      &:hover {
        background-color: #222e41;
        border-color: #a5def1;
        color: #a5def1;
      }
    }
    
    &--success {
      background-color: #67c23a;
      border-color: #67c23a;
      
      &:hover {
        background-color: #85ce61;
        border-color: #85ce61;
      }
    }
    
    &--warning {
      background-color: #e6a23c;
      border-color: #e6a23c;
      
      &:hover {
        background-color: #ebb563;
        border-color: #ebb563;
      }
    }
    
    &--danger {
      background-color: #f56c6c;
      border-color: #f56c6c;
      
      &:hover {
        background-color: #f78989;
        border-color: #f78989;
      }
    }
    
    &--info {
      background-color: #909399;
      border-color: #909399;
      
      &:hover {
        background-color: #a6a9ad;
        border-color: #a6a9ad;
      }
    }
  }
  
  // 表格样式
  .el-table {
    background-color: #2c3d55 !important;
    color: #ffffff !important;
    
    th {
      background-color: #2a3950 !important;
      color: #ffffff !important;
      border-bottom: 1px solid #5f6e8a !important;
    }
    
    td {
      border-bottom: 1px solid rgba(95, 110, 138, 0.3) !important;
      background-color: #2c3d55 !important;
      color: #ffffff !important;
    }
    
    tr {
      &:hover {
        td {
          background-color: #323e52 !important;
        }
      }
      
      &.current-row {
        td {
          background-color: rgba(58, 123, 153, 0.2) !important;
        }
      }
    }
    
    .el-table__fixed-right::before,
    .el-table__fixed::before {
      background-color: rgba(95, 110, 138, 0.3);
    }
  }
  
  // 分页器样式
  .el-pagination {
    .el-pager li {
      background-color: #2c3d55;
      color: #88a7b1;
      border: 1px solid #5f6e8a;
      
      &:hover {
        color: #a5def1;
        background-color: #222e41;
      }
      
      &.active {
        background-color: #3a7b99;
        color: #ffffff;
        border-color: #3a7b99;
      }
    }
    
    .btn-prev,
    .btn-next {
      background-color: #2c3d55;
      color: #88a7b1;
      border: 1px solid #5f6e8a;
      
      &:hover {
        color: #a5def1;
        background-color: #222e41;
      }
    }
    
    .el-pagination__total,
    .el-pagination__jump {
      color: #88a7b1;
    }
  }
}

